package com.extend_;

public class ExtendsTheory {
    public static void main(String[] args) {
        A a = new A();
        a.A();
        System.out.println(a.name);
        System.out.println(((father)a).name);
    }
}

class father{
    String name = "小明";
    int age = 60;
}

class son extends father{
    String name = "强子";
}
class A extends son{
    String name = "A";
    public void A(){
        System.out.println(super.name);
    }
}